package com.sky.mapper.user;

import com.sky.pojo.User;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserLoginMapper {
    /**
     * 查询openId是否存在 返回个人信息
     *
     * @param openId
     * @return
     */
    @Select("select*from user where openid=#{openId} ")
    User getOpenId(String openId);

    /**
     * 添加个人信息
     *
     * @param user
     */
    @Insert("insert into user( openid, name, create_time)values (#{openid}, #{name}, #{createTime})")
    void addUserOpenID(User user);
}
